package com.hlbb.business;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.encoding.Md5PasswordEncoder;

import com.hlbb.dao.AddressDAO;
import com.hlbb.dao.CamasterDAO;
import com.hlbb.dao.CustomerDAO;

public abstract class BaseManager {

	@Autowired
	private CustomerDAO customerDAO;
	@Autowired
	private AddressDAO addressDAO;
	@Autowired
	private CamasterDAO camasterDAO;
	
	public CustomerDAO getCustomerDAO() {
		return customerDAO;
	}

	public AddressDAO getAddressDAO() {
		return addressDAO;
	}	
	
	public String encodeString(String str) {
		Md5PasswordEncoder encode = new Md5PasswordEncoder();
		return encode.encodePassword(str, null);
	}

	public CamasterDAO getCamasterDAO() {
		return camasterDAO;
	}
}
